<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="security" uri="http://www.springframework.org/security/tags" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>User profile</title>
    <script src="${pageContext.request.contextPath}/resources/jquery/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/resources/jquery/jquery.form.js"></script>
    <script src="${pageContext.request.contextPath}/resources/jquery/jquery.validate.js"></script>
    <script src="${pageContext.request.contextPath}/resources/jquery/validation.changepassword.js"></script>
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/css/bootstrap.css" >
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/resources/css/validation.css" >
    <link rel="shortcut icon" href="http://twitter.github.io/bootstrap/assets/ico/favicon.png">
</head>
<body>

<jsp:include page="topbar.jsp" />

<h4><a href="/main">Return to main page</a></h4><br>


<h2 class="form-signin-heading">Name: ${username}</h2>
<h2 class="form-signin-heading">Role: ${role}</h2>
<div>
<form class="form-signin" id="f" name="f" method='POST'>
    <h2 class="form-signin-heading">Change password</h2>
    <input type="text" class="input-block-level" placeholder="Current password" id='current' name='current'/>
    <input type="password" class="input-block-level" placeholder="New password" id='new' name='new'/>
    <input type="password" class="input-block-level" placeholder="Confirm new password" id='confirm' name='confirm'/>
    <button class="btn btn-large btn-primary" type="submit">Change</button>
</form>
    <h4><a href="/delete_profile"
       onclick="return confirm('Really delete your account?')">Delete your account</a>
    </h4>
</div>
</body>
</html>